<?php
/**
 * Created by PhpStorm.
 * User: charles
 * Date: 2017-11-26
 * Time: 12:51
 */

namespace App\Http\Controllers\LA;


use App\Http\Controllers\Controller;
use App\Models\Settings;
use App\Models\SettingsCache;
use Illuminate\Http\Request;

class SettingsController extends Controller
{
    public function index()
    {
        return view('la.settings.index');
    }

    public function store(Request $request)
    {
        SettingsCache::set('fee_rate', $request->percentage);
        Settings::set('fee_rate', $request->percentage);
        SettingsCache::set('service_qr_url', $request->service_qr_url);
        Settings::set('service_qr_url', $request->service_qr_url);
        SettingsCache::set('is_running', $request->is_running);
        Settings::set('is_running', $request->is_running);


        return redirect()->back();
    }
}